import Vue from 'vue'
import Router from 'vue-router'
const Home = () => import('./views/home')
const UserList = () => import('./views/datamanagement/UserList')
const ShopList = () => import('./views/datamanagement/ShopList')
const FoodList = () => import('./views/datamanagement/FoodList')
const OrderList = () => import('./views/datamanagement/OrderList')
const AdministarorList = () => import('./views/datamanagement/AdministarorList')
const Chart = () => import('./views/chart')
const Edit = () => import('./views/edit')
const AddShop = () => import('./views/adddata/AddShop')
const AddStore = () => import('./views/adddata/AddStore')
const Explain = () => import('./views/explain')
const Set = () => import('./views/set')
const Error = () => import('./views/error')
const Login = () => import('./views/login')
const Regirst = () => import('./views/regirst')

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
     {
      path:'/home',
      component:Home
     },
     {
       path:'/userlist',
       component:UserList
     },
     {
       path:'/shoplist',
       component:ShopList
     },
     {
       path:'/foodlist',
       component:FoodList
     },
     {
       path:'/orderlist',
       component:OrderList
     },
     {
       path:'/administarlsit',
       component:AdministarorList
     },
     {
       path:'/chart',
       component:Chart
     },
     {
       path:'/edit',
       component:Edit
     },
     {
       path:'/addshop',
       component:AddShop
     },
     {
       path:'/addstore',
       component:AddStore
     },
     {
       path:'/explain',
       component:Explain
     },
     {
       path:'/set',
       component:Set
     },
     {
       path:'/login',
       component:Login
     },
     {
       path:'/regirst',
       component:Regirst
     },
     {
       path:'/error',
       component:Error
     },
     {
       path:'*',
       redirect:'/error',
     }
  ]
})
